<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">

            <div class="ibox-content">


                <button class="btn btn-primary " data-toggle="modal" data-target="#myModal">
                    新增品牌
                </button>
                <!-- Modal -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                </button>
                                <h4 class="modal-title" id="myModalLabel">增加新品牌</h4>
                            </div>
                            <div class="modal-body">
                                <form method="post" class="form-horizontal">
                                    <div class="form-group"><label class="col-sm-2 control-label">名称：</label>
                                        <div class="col-sm-9"><input type="text" name="title"
                                                                     class="form-control ">
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" id="insert_info" class="btn btn-primary">保存</button>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="bs-example">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th>选择</th>
                            <th>序号</th>
                            <th>品牌名称</th>
                            <th>修改</th>
                            <th>删除</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="DATA" item="value" key="k"}
                        <tr>
                            <td><input type="checkbox" name="check" value=""></td>
                            <td value="{$value['id']}">{$k+1}</td>
                            <td id="td{$value['id']}">{$value['title']}</td>
                            <td>
                                <a data-toggle="modal"  name ="change" data-target="#myModal2{$k}">
                                    修改
                                </a>
                                <!-- Modal -->
                                <div class="modal fade" id="myModal2{$k}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"
                                     aria-hidden="true">
                                    <div class="modal-dialog">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
                                                </button>
                                                <h4 class="modal-title" id="myModalLabel2">修改功能</h4>
                                            </div>
                                            <div class="modal-body">
                                                <form method="post" class="form-horizontal form2">
                                                    <div class="form-group"><label class="col-sm-2 control-label">名称：</label>
                                                        <div class="col-sm-9">
                                                            <input type="text" class="form-control" value="{$value['title']}" name='name' id="ceshi{$value['id']}">
                                                        </div>
                                                    </div>

                                                </form>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                <button type="button" name="save" id="{$value['id']}" class="btn btn-primary">保存</button>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </td>

                            <!--<td><button onclick="aadel({$value['id']},this)">shanchu</button></td>-->
                            <td><a href="javascript:;" name = "del" value="{$value['id']}">删除</a></td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

            </div>
        </div>
    </div>
</div>
